import {
	Message
} from 'element-ui'
import {
	Toast
} from 'vant';
const showMessage = Symbol('showMessage')
class DonMessage {
	success(options, single = true) {
		this[showMessage]('success', options, single)
	}
	warning(options, single = true) {
		this[showMessage]('warning', options, single)
	}
	info(options, single = true) {
		this[showMessage]('info', options, single)
	}
	error(options, single = true) {
			this[showMessage]('fail', options, single)
		}
		[showMessage](type, options, single) {
			// 判断是否已存在Message
			// if (single) {
			// 	if (document.getElementsByClassName('el-message').length === 0) {
			// 		Toast[type](options)
			// 	}
			// } else {
			// 	Toast[type](options)
			// }
			// console.log('type', type, options);
			Toast[type](options)
		}
}
export default new DonMessage()